package com.mkait.thief.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 微信粉丝
 * @TableName wechat_fans
 */
@TableName(value ="wechat_fans")
@Data
public class WechatFans implements Serializable {
    /**
     * 粉丝表ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 公众号Appid
     */
    @TableField(value = "appid")
    private String appid;

    /**
     * 分组ID
     */
    @TableField(value = "groupid")
    private Long groupid;

    /**
     * 标签id
     */
    @TableField(value = "tagid_list")
    private String tagidList;

    /**
     * 是否为黑名单用户
     */
    @TableField(value = "is_back")
    private Integer isBack;

    /**
     * 用户是否订阅该公众号，0：未关注，1：已关注
     */
    @TableField(value = "subscribe")
    private Integer subscribe;

    /**
     * 用户的标识，对当前公众号唯一
     */
    @TableField(value = "openid")
    private String openid;

    /**
     * 推荐人OPENID
     */
    @TableField(value = "spread_openid")
    private String spreadOpenid;

    /**
     * 
     */
    @TableField(value = "spread_at")
    private Date spreadAt;

    /**
     * 用户的昵称
     */
    @TableField(value = "nickname")
    private String nickname;

    /**
     * 用户的性别，值为1时是男性，值为2时是女性，值为0时是未知
     */
    @TableField(value = "sex")
    private Integer sex;

    /**
     * 用户所在国家
     */
    @TableField(value = "country")
    private String country;

    /**
     * 用户所在省份
     */
    @TableField(value = "province")
    private String province;

    /**
     * 用户所在城市
     */
    @TableField(value = "city")
    private String city;

    /**
     * 用户的语言，简体中文为zh_CN
     */
    @TableField(value = "language")
    private String language;

    /**
     * 用户头像
     */
    @TableField(value = "headimgurl")
    private String headimgurl;

    /**
     * 用户关注时间
     */
    @TableField(value = "subscribe_time")
    private Long subscribeTime;

    /**
     * 关注时间
     */
    @TableField(value = "subscribe_at")
    private Date subscribeAt;

    /**
     * unionid
     */
    @TableField(value = "unionid")
    private String unionid;

    /**
     * 备注
     */
    @TableField(value = "remark")
    private String remark;

    /**
     * 有效时间
     */
    @TableField(value = "expires_in")
    private Long expiresIn;

    /**
     * 刷新token
     */
    @TableField(value = "refresh_token")
    private String refreshToken;

    /**
     * 访问token
     */
    @TableField(value = "access_token")
    private String accessToken;

    /**
     * 创建时间
     */
    @TableField(value = "create_at")
    private Date createAt;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        WechatFans other = (WechatFans) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getAppid() == null ? other.getAppid() == null : this.getAppid().equals(other.getAppid()))
            && (this.getGroupid() == null ? other.getGroupid() == null : this.getGroupid().equals(other.getGroupid()))
            && (this.getTagidList() == null ? other.getTagidList() == null : this.getTagidList().equals(other.getTagidList()))
            && (this.getIsBack() == null ? other.getIsBack() == null : this.getIsBack().equals(other.getIsBack()))
            && (this.getSubscribe() == null ? other.getSubscribe() == null : this.getSubscribe().equals(other.getSubscribe()))
            && (this.getOpenid() == null ? other.getOpenid() == null : this.getOpenid().equals(other.getOpenid()))
            && (this.getSpreadOpenid() == null ? other.getSpreadOpenid() == null : this.getSpreadOpenid().equals(other.getSpreadOpenid()))
            && (this.getSpreadAt() == null ? other.getSpreadAt() == null : this.getSpreadAt().equals(other.getSpreadAt()))
            && (this.getNickname() == null ? other.getNickname() == null : this.getNickname().equals(other.getNickname()))
            && (this.getSex() == null ? other.getSex() == null : this.getSex().equals(other.getSex()))
            && (this.getCountry() == null ? other.getCountry() == null : this.getCountry().equals(other.getCountry()))
            && (this.getProvince() == null ? other.getProvince() == null : this.getProvince().equals(other.getProvince()))
            && (this.getCity() == null ? other.getCity() == null : this.getCity().equals(other.getCity()))
            && (this.getLanguage() == null ? other.getLanguage() == null : this.getLanguage().equals(other.getLanguage()))
            && (this.getHeadimgurl() == null ? other.getHeadimgurl() == null : this.getHeadimgurl().equals(other.getHeadimgurl()))
            && (this.getSubscribeTime() == null ? other.getSubscribeTime() == null : this.getSubscribeTime().equals(other.getSubscribeTime()))
            && (this.getSubscribeAt() == null ? other.getSubscribeAt() == null : this.getSubscribeAt().equals(other.getSubscribeAt()))
            && (this.getUnionid() == null ? other.getUnionid() == null : this.getUnionid().equals(other.getUnionid()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
            && (this.getExpiresIn() == null ? other.getExpiresIn() == null : this.getExpiresIn().equals(other.getExpiresIn()))
            && (this.getRefreshToken() == null ? other.getRefreshToken() == null : this.getRefreshToken().equals(other.getRefreshToken()))
            && (this.getAccessToken() == null ? other.getAccessToken() == null : this.getAccessToken().equals(other.getAccessToken()))
            && (this.getCreateAt() == null ? other.getCreateAt() == null : this.getCreateAt().equals(other.getCreateAt()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getAppid() == null) ? 0 : getAppid().hashCode());
        result = prime * result + ((getGroupid() == null) ? 0 : getGroupid().hashCode());
        result = prime * result + ((getTagidList() == null) ? 0 : getTagidList().hashCode());
        result = prime * result + ((getIsBack() == null) ? 0 : getIsBack().hashCode());
        result = prime * result + ((getSubscribe() == null) ? 0 : getSubscribe().hashCode());
        result = prime * result + ((getOpenid() == null) ? 0 : getOpenid().hashCode());
        result = prime * result + ((getSpreadOpenid() == null) ? 0 : getSpreadOpenid().hashCode());
        result = prime * result + ((getSpreadAt() == null) ? 0 : getSpreadAt().hashCode());
        result = prime * result + ((getNickname() == null) ? 0 : getNickname().hashCode());
        result = prime * result + ((getSex() == null) ? 0 : getSex().hashCode());
        result = prime * result + ((getCountry() == null) ? 0 : getCountry().hashCode());
        result = prime * result + ((getProvince() == null) ? 0 : getProvince().hashCode());
        result = prime * result + ((getCity() == null) ? 0 : getCity().hashCode());
        result = prime * result + ((getLanguage() == null) ? 0 : getLanguage().hashCode());
        result = prime * result + ((getHeadimgurl() == null) ? 0 : getHeadimgurl().hashCode());
        result = prime * result + ((getSubscribeTime() == null) ? 0 : getSubscribeTime().hashCode());
        result = prime * result + ((getSubscribeAt() == null) ? 0 : getSubscribeAt().hashCode());
        result = prime * result + ((getUnionid() == null) ? 0 : getUnionid().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        result = prime * result + ((getExpiresIn() == null) ? 0 : getExpiresIn().hashCode());
        result = prime * result + ((getRefreshToken() == null) ? 0 : getRefreshToken().hashCode());
        result = prime * result + ((getAccessToken() == null) ? 0 : getAccessToken().hashCode());
        result = prime * result + ((getCreateAt() == null) ? 0 : getCreateAt().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", appid=").append(appid);
        sb.append(", groupid=").append(groupid);
        sb.append(", tagidList=").append(tagidList);
        sb.append(", isBack=").append(isBack);
        sb.append(", subscribe=").append(subscribe);
        sb.append(", openid=").append(openid);
        sb.append(", spreadOpenid=").append(spreadOpenid);
        sb.append(", spreadAt=").append(spreadAt);
        sb.append(", nickname=").append(nickname);
        sb.append(", sex=").append(sex);
        sb.append(", country=").append(country);
        sb.append(", province=").append(province);
        sb.append(", city=").append(city);
        sb.append(", language=").append(language);
        sb.append(", headimgurl=").append(headimgurl);
        sb.append(", subscribeTime=").append(subscribeTime);
        sb.append(", subscribeAt=").append(subscribeAt);
        sb.append(", unionid=").append(unionid);
        sb.append(", remark=").append(remark);
        sb.append(", expiresIn=").append(expiresIn);
        sb.append(", refreshToken=").append(refreshToken);
        sb.append(", accessToken=").append(accessToken);
        sb.append(", createAt=").append(createAt);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}